package com.sitech.ibnms.common.action;

import com.sitech.ibnms.core.BaseIbnmsAction;
import com.sitech.ibnms.util.SysDictUtil;
import com.sitech.ibnms.util.domain.SysDict;
import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author liujhc <liujhc@si-tech.com.cn>
 */
public class SysDictAction extends BaseIbnmsAction {

    private SysDict dict;
    private Map<String, String> paramsMap;

    @Override
    public String execute() {
        dict = SysDictUtil.getSysDict(dict.getDictId(), paramsMap);
        return SUCCESS;
    }

    public SysDict getDict() {
        if (this.dict == null) {
            this.dict = new SysDict();
        }
        return dict;
    }

    public Map<String, String> getParamsMap() {
        if (this.paramsMap == null) {
            this.paramsMap = new HashMap();
        }
        return paramsMap;
    }
}
